//
//  QLKNavigationController.m
//  CloudsOutpatient
//
//  Created by czy on 15/6/17.
//  Copyright (c) 2015年 HC. All rights reserved.
//

#import "QLKNavigationController.h"
@interface QLKNavigationController ()<UINavigationControllerDelegate,UIGestureRecognizerDelegate>

@end

@implementation QLKNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
  
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (id)initWithRootViewController:(UIViewController *)rootViewController
{
    self = [super initWithRootViewController:rootViewController];
    
    self.delegate = self;
    
    return self;
    NSAssert(NO, @"rootViewController 不是 KXBaseViewController 的子类");
    
    return nil;
}


#pragma mark - UINavigationControllerDelegate
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
    if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
        navigationController.interactivePopGestureRecognizer.enabled = YES;
    }
    if (navigationController.viewControllers.count == 1) {
        navigationController.interactivePopGestureRecognizer.enabled = NO;
    }

}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    
}

@end
